import request from '@/utils/request'

// 分页查询列表
export function listDict(data) {
  return request({
    url: '/sys/dict/list',
    method: 'post',
    data
  })
}

// 新增、编辑字典
export function saveDict(data) {
  return request({
    url: '/sys/dict/save',
    method: 'post',
    data
  })
}

// 删除字典
export function deleteDict(ids) {
  return request({
    url: '/sys/dict/del?ids=' + ids,
    method: 'delete'
  })
}

// 获取子字典列表
export function getChildDictById(id) {
  return request({
    url: '/sys/dict/getChildById/' + id,
    method: 'get'
  })
}
